﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace John
{
    public partial class Extend_MasterPage : System.Web.UI.MasterPage
    {
        public string sitename;      
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //getCategory();
            }

        }
        private void getCategory()
        {
            if (Request.QueryString["name"] != null)
            {
                string sql = "select gsname from Muser where hyname='" + Request.QueryString["name"].ToString() + "'";

                DBConn mydb = new DBConn();
                SqlDataReader dr = mydb.getDataReader(sql);
                if (dr.Read())
                {
                    sitename = dr["gsname"].ToString();
                    Label1.Text = dr["gsname"].ToString();
                }
                dr.Close();
                mydb.Close();
            }
        }
    }
}
